<#assign module="chart"/>

<@override name="header">
<link rel="stylesheet" href="${ctx}/assets/css/datetimepicker.css">
<style>
	.table > thead > tr > th {
	    text-align:center;
	}
	.table > tbody > tr > td{
		vertical-align:middle;
		text-align:center;
	}
</style>
</@override>
<@override name="body">

<div class="row">
	<div class="col-xs-13">
		<div class="col-md-2">
			<ul class="list-group">
	        	<#--
	        	<li class="list-group-item"><a  href="${ctx}/chart/heatMap">热力图</a></li>
	        	-->
	        	<@daijia>
		        <li class="list-group-item"><a  href="${ctx}/chart/compositive">代驾订单汇总</a></li>
		        </@daijia>
				<@pao>
				<li class="list-group-item"><a  href="${ctx}/chart/paotuiCompositive">跑腿订单汇总</a></li>
				</@pao>
				<@zhuan>
				<li class="list-group-item"><a  href="${ctx}/chart/zhuanCompositive">专车订单汇总</a></li>
				</@zhuan>
				<@freight>
				<li class="list-group-item"><a  href="${ctx}/chart/freightCompositive">货运订单汇总</a></li>
				</@freight>
				<@zhuanxian>
			<li class="list-group-item"><a  href="${ctx}/chart/zhuanxianCompositive">快车订单汇总</a></li>
			</@zhuanxian>
		        <li class="list-group-item"><a  href="${ctx}/chart/orderYearChart">订单统计</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/orderType">订单来源统计</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/memberOrder1">客户消费统计</a></li>
				<li class="list-group-item"><a  href="${ctx}/chart/tableNewMemberMonth">新增客户统计</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/driverOrder">服务人员业绩</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/introduce">推荐员工业绩</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/infoFee">保险费/信息费</a></li>
			    <@shiro.isMainCompany>
			    <li class="list-group-item"><a  href="${ctx}/chart/companyOrder">公司统计</a></li>
			    </@shiro.isMainCompany>
			    <!-- <li class="list-group-item"><a  href="${ctx}/chart/activity">活动统计</a></li> -->
			    <li class="list-group-item"><a  href="${ctx}/chart/driverTime">服务人员在线时间统计</a></li>
		    </ul>
		</div>
		 

		<div class="col-md-10">
		
			<div role="tabpanel">
			    <!-- Tab panes -->
			    <div class="tab-content">
				    <div role="tabpanel" class="tab-pane fade in active" id="tab1">
				    	<div class="row margin-top">
							<div class="col-xs-12">
								<form class="form-inline" id="SearchForm" method="get">
									<@shiro.isMainCompany>
										<select class="form-control" name="companyId" id="companyId">
											<option value="">全部</option>
								  			<#list companys as company>
								  				<option value="${company.id}" <#if companyId?? && companyId==company.id>selected="selected"</#if>>${company.abbreviation}</option>
								  			</#list>
							  			</select>
					  				</@shiro.isMainCompany>
					  				
					  				<div class="form-group">
							  			<input type="text" class="form-control" id="driverName"  name="driverName" value="${driverName?if_exists}"  placeholder="输入服务人员姓名/工号">
							  		</div>
							  	
								  	<div class="input-group">
										<input id="startTime" type="text" class="form-control" placeholder="开始时间" />
									</div>
									
								  	<div class="form-group">
								  		<input id="endTime" type="text" class="form-control" placeholder="结束时间" />
								    </div>
								    
								    <div class="form-group" id="choseType">
								    	
								        <ul class="nav nav-pills">
								        <li data="today"><a href="javascript:;">今天</a></li>
								        <li data="yesterday"><a href="javascript:;">昨天</a></li>
								        <li data="month"><a href="javascript:;">本月</a></li>
								        <li data="lastmonth"><a href="javascript:;">上月</a></li>
										</ul>
						       		</div>
								    
								    
								    <div class="form-group">
								        <button type="button" id="search_button" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> 查询</button>
								   		<button id="export_button" type="button" class="btn btn-primary col-sm-offset-0"><i class="glyphicon glyphicon-save"></i>导出</button>
								    </div>
							    </form>
						    </div>
					    </div>
			
						<ul class="pagination pull-left pagination-sm pageshow">
							<li><a>共 <span class="totalElements"></span> 条数据</a></li>
						</ul>
						<ul id="pagination" class="pagination pull-left pagination-sm pagedata">
	   					</ul>
   									  
						<div class="row margin-top">
							<div class="col-xs-12">
								<div class="table-responsive">
									<div class="panel panel-primary">
									  <table class="table table-hover  table-bordered">
									  	<thead>
									  		<tr style="font-size:14px;">
									  			<th colspan="3">#</th>
									  			<@daijia>
									  				<@shiro.hasPermission name='order'>
											  			<th colspan="3">代驾</th>
										  			</@shiro.hasPermission>
									  			</@daijia>
									  			<@zhuan>	
										  			<@shiro.hasPermission name='zhuan'>
										  				<th colspan="3">专车</th>
										  			</@shiro.hasPermission>
									  		    </@zhuan>
									  		    <@pao>	
										  			<@shiro.hasPermission name='errand'>
										  				<th colspan="3">跑腿</th>
										  			</@shiro.hasPermission>
									  		    </@pao>
									  		    <@freight>	
										  			<@shiro.hasPermission name='freight'>
										  				<th colspan="3">货运</th>
										  			</@shiro.hasPermission>
									  		    </@freight>		
									  		    <@zhuanxian>	
										  			<@shiro.hasPermission name='zhuanxian'>
										  				<th colspan="3">快车</th>
										  			</@shiro.hasPermission>
									  		    </@zhuanxian>		
									  		</tr>
									  	</thead>
									  	<tbody>
									  		<tr>
										  		<td>服务人员(工号)</td>
										  		<td>类型</td>
										  		<td>所属公司</td>
										  		<@daijia>
										  			<@shiro.hasPermission name='order'>
												  		<td>完成单量</td>
												  		<td>订单金额</td>
												  		<td>提成</td>
										  			</@shiro.hasPermission>
										  		</@daijia>
										  		<@zhuan>	
											  	 	<@shiro.hasPermission name='zhuan'>
												  		<td>完成单量</td>
												  		<td>订单金额</td>
												  		<td>提成</td>
											  		</@shiro.hasPermission>
										  	  	</@zhuan>
										  	  	<@pao>	
											  		<@shiro.hasPermission name='errand'>
												  		<td>完成单量</td>
												  		<td>订单金额</td>
												  		<td>提成</td>
											  		</@shiro.hasPermission>
										  	  	</@pao>
										  	  	<@freight>	
											  	 	<@shiro.hasPermission name='freight'>
												  		<td>完成单量</td>
												  		<td>订单金额</td>
												  		<td>提成</td>
											  		</@shiro.hasPermission>
										  	  	</@freight>	
										  	  	<@zhuanxian>	
											  	 	<@shiro.hasPermission name='zhuanxian'>
												  		<td>完成单量</td>
												  		<td>订单金额</td>
												  		<td>提成</td>
											  		</@shiro.hasPermission>
										  	  	</@zhuanxian>	
									  		</tr>
									  		
									  	</tbody>
									  </table>
									  
									  <ul class="pagination pull-left pagination-sm pageshow">
									  	<li><a>共<span class="totalElements"></span>  条数据</a></li>
									  </ul>
									  <ul class="pagination pull-left pagination-sm pagedata">
									  </ul>
   									  
									</div>
								</div>
							</div>
						</div>
				    </div>
				    
			    </div>
			</div>
			 
		</div>
		
	</div>
</div>

</@override>


<@override name="footer">
<script>
	var dj = false;
	var zhuanche = false;
    var errand = false;
    var freight = false;
    var zhuanxian = false;
    <@daijia>
    	<@shiro.hasPermission name='order'>
    		dj = true;
    	</@shiro.hasPermission>
    </@daijia>
    <@zhuan>
		<@shiro.hasPermission name='zhuan'>
    		zhuanche=true;
   		</@shiro.hasPermission>
	</@zhuan>
	<@pao> 
	    <@shiro.hasPermission name='errand'>
	    	errand=true;
	    </@shiro.hasPermission>
	</@pao>
	<@freight>
    	<@shiro.hasPermission name='freight'>
    		freight=true;
   		</@shiro.hasPermission>
	</@freight>
	<@zhuanxian>
    	<@shiro.hasPermission name='zhuanxian'>
    		zhuanxian=true;
   		</@shiro.hasPermission>
	</@zhuanxian>
	window.daijia = {ctx:'${ctx}',totalElements:'',dj:dj,zhuan:zhuanche,errand:errand,freight:freight,zhuanxian:zhuanxian};
</script>
<script src="${ctx}/assets/js/bootstrap-datetimepicker.min.js"></script>
<script src="${ctx}/assets/js/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="${ctx}/assets/js/jquery.paging.min.js"></script>
<script src="${ctx}/assets/js/chart/driverOrder.js"></script>
</@override>
<@extends name="../layout.ftl"/>
